<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function A() { };
        A.prototype.n = 1;
        var b = new A();
        A.prototype = {
            n: 2,
            m: 3
        };
        var c = new A();
        console.log(b.n, b.m, c.n, c.m);
        //1 undefined 2 3

        console.log('---------------');

        function F() { };
        Object.prototype.a = function(){
            console.log('a()');
        };
        Function.prototype.b = function(){
            console.log('b()');
        };
        var f = new F();
        f.a();
        // f.b();
        F.a();
        F.b();


        // function fun(n, o) {//简称f1
        //     console.log(o)
        //     return {
        //         fun: function (m) { //这里简称f2
        //             return fun(m, n)
        //         }
        //     }
        // }
        // var a = fun(0)
        // a.fun(1)
    </script>
</body>

</html>